package cn.jwtool.jwcache.buffer.data.backup;

import cn.jwtool.jwcache.buffer.data.backup.impl.JsonSerialization;

/**
 * @author : willian fu
 * @version : 1.0
 */
public interface Serialization {

    //默认序列化算法为JSON
    Serialization DEFAULT = new JsonSerialization();

    /**
     * 序列化成
     * @param object
     * @return
     */
    byte[] serialization(Object object);

    <T> T deserialization(byte[] data, Class<T> clazz);
}
